{template 'common/header'}
{if $op == 'display'}
<form class="form-horizontal" action="" method="post">
    <table class="table we7-table table-hover article-list vertical-middle">
        <tr>
            <td style="width:100px">排序</td>
            <td>用户昵称</td>
            <td>用户头像</td>
            <td>用户姓名</td>
            <td>用户性别</td>
            <td>详情</td>
            <td>审核状态</td>
            <td class="text-right">操作</td>
        </tr>
        {loop $products $item}
        <tr>
            <td>
                {$item['u_id']}
            </td>
            <td>
                {$item['u_name']}
            </td> 
            <td>
                <img src="{media $item['u_thumb']}" width="100px" alt="">
            </td> 
            <td>
                {$item['u_bname']}
            </td>   
            <td>
                {$item['u_sex']}
            </td>                 
            <td>
                <a class="btn btn-default btn-sm"  href="{php echo $this->createWeburl('user', array('u_id' => $item['u_id'], 'op' => 'post'))}">查看</a>
            </td>
            <td>
                {if $item['u_typs']=='待审核'}
                <a class="btn btn-default btn-sm"  style="color:red" href="{php echo $this->createWeburl('user', array('u_id' => $item['u_id'], 'op' => 'save'))}">待审核</a>
                {/if}
                {if $item['u_typs']=='审核通过'}
                <a class="btn btn-default btn-sm"  style="color:green">审核通过</a>
                {/if}
                {if $item['u_typs']==''}
                <a class="btn btn-default btn-sm">未填写资料</a>
                {/if}
            </td>
            <td class="text-right">
                <a class="btn btn-default btn-sm" onclick="return confirm('此操作不可恢复，确认吗？'); return false;" href="{php echo $this->createWeburl('user', array('u_id' => $item['u_id'], 'op' => 'delete'))}">删除</a>
            </td>
        </tr>
        {/loop}
    </table>
</form>
{$pager}
{/if}
{if $op == "post"}
<form class="form-horizontal" action="" method="post">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">用户详情</h3>
        </div>
        <div class="panel-body">
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">昵称</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_name" id="u_name" value="{$item['u_name']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">头像</label>
                <div class="form-controls col-sm-5">
                     <img src="{media $item['u_thumb']}" width="100px" alt="">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">真实姓名</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_bname" id="u_bname" value="{$item['u_bname']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">出生日期</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_chusheng" id="u_chusheng" value="{$item['u_chusheng']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">性别</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_sex" id="u_sex" value="{$item['u_sex']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">身高</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_shengao" id="u_shengao" value="{$item['u_shengao']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">联系方式</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_tel" id="u_tel" value="{$item['u_tel']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">邮箱</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_email" id="u_email" value="{$item['u_email']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">qq</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_qq" id="u_qq" value="{$item['u_qq']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">学校</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="u_school" id="u_school" value="{$item['u_shcool']}--------{$item['u_jiaoyu']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">个人情况</label>
                <div class="form-controls col-sm-5">
                   <textarea rows="6" cols="20" name="u_content" id="u_content"  class="form-control ng-pristine ng-untouched ng-valid ng-empty">{$item['u_content']}</textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12" style="margin-left: 200px;">
                    <input name="token" type="hidden" value="{$_W['token']}" />
                    <input type="submit" class="btn btn-primary col-lg-5" name="submit" value="提交" />
                </div>
            </div>
</div>
</from>
{/if}
{template 'common/footer'}